<?php

namespace app\product\controller;

use app\common\controller\PCBase;
use app\product\logic\ProductLogic;
use Throwable;
use  think\App;
class Product extends PCBase
{

    protected $productLogic = null;
    public function __construct(App $app,ProductLogic $productLogic)
    {
        parent::__construct($app);
        $this->productLogic = $productLogic;
    }


    /**
     * 查看列表
     * @throws Throwable
     */
    public function index()
    {
        $params     = $this->request->post();
        return $this->productLogic->getProductList($params);
    }


    /**
     * 获取详情
     * @throws Throwable
     */
    public function getInfo()
    {
        $params     = $this->request->post();
        return $this->productLogic->getInfo($params);
    }




}